# -*-makefile-*-
#
# Copyright (C) @YEAR@ by @AUTHOR@
#
# For further information about the PTXdist project and license conditions
# see the README file.
#

#
# We provide this package
#
PACKAGES-$(PTXCONF_@PACKAGE@) += @package@

#
# Paths and names
#
@PACKAGE@_VERSION	:= @VERSION@
@PACKAGE@		:= @package@-$(@PACKAGE@_VERSION)
@PACKAGE@_URL		:= file://local_src/@package@
@PACKAGE@_DIR		:= $(BUILDDIR)/$(@PACKAGE@)
@PACKAGE@_BUILD_OOT	:= YES
@PACKAGE@_LICENSE	:= unknown

# ----------------------------------------------------------------------------
# Extract (just create the 'configure' script on demand)
# ----------------------------------------------------------------------------

$(STATEDIR)/@package@.extract.post: $(STATEDIR)/autogen-tools
	@$(call targetinfo)
	@cd $(@PACKAGE@_DIR) && [ -f configure ] || sh autogen.sh
	@$(call world/patchin/post, @PACKAGE@)
	@$(call touch)

# ----------------------------------------------------------------------------
# Prepare
# ----------------------------------------------------------------------------

#@PACKAGE@_CONF_ENV	:= $(CROSS_ENV)

#
# autoconf
#
@PACKAGE@_CONF_TOOL	:= autoconf
#@PACKAGE@_CONF_OPT	:= $(CROSS_AUTOCONF_USR)

#$(STATEDIR)/@package@.prepare:
#	@$(call targetinfo)
#	@$(call world/prepare, @PACKAGE@)
#	@$(call touch)

# ----------------------------------------------------------------------------
# Compile
# ----------------------------------------------------------------------------

#$(STATEDIR)/@package@.compile:
#	@$(call targetinfo)
#	@$(call world/compile, @PACKAGE@)
#	@$(call touch)

# ----------------------------------------------------------------------------
# Install
# ----------------------------------------------------------------------------

#$(STATEDIR)/@package@.install:
#	@$(call targetinfo)
#	@$(call world/install, @PACKAGE@)
#	@$(call touch)

# ----------------------------------------------------------------------------
# Target-Install
# ----------------------------------------------------------------------------

$(STATEDIR)/@package@.targetinstall:
	@$(call targetinfo)

	@$(call install_init, @package@)
	@$(call install_fixup, @package@, PRIORITY, optional)
	@$(call install_fixup, @package@, SECTION, base)
	@$(call install_fixup, @package@, AUTHOR, "@AUTHOR@")
	@$(call install_fixup, @package@, DESCRIPTION, "TODO @package@")

#	# This is an example only. Adapt it to your requirements. Read the
#	# documentation's section "Make it Work" in chapter "Adding new Packages"
#	# how to prepare this content or/and read chapter
#	# "Rule File Macro Reference" to get an idea of the available macros
#	# you can use here and how to use them.

#	# install library (note: may fail, if there is no library)
	@$(call install_lib, @package@, 0, 0, 0644, lib@package@)

#	# install binary (note: may fail, if there is no binary)
	@$(call install_copy, @package@, 0, 0, 0755, -, /usr/bin/@package@)

	@$(call install_finish, @package@)

	@$(call touch)

# ----------------------------------------------------------------------------
# Clean
# ----------------------------------------------------------------------------

#$(STATEDIR)/@package@.clean:
#	@$(call targetinfo)
#	@$(call clean_pkg, @PACKAGE@)

# vim: syntax=make
